package _13FacadeDesignPattern;

/**
 * 外观模式如同一个 暗箱容器，将表面的方法呈现出来，而进一步的实现给封装起来
 * 别人无法看见
 */
public class JiJin{
    private GuoZhai guoZhai;
    private QiHuo qiHuo;
    private GuPiao guPiao;
    public JiJin(){
        guPiao=new GuPiao();
        guoZhai=new GuoZhai();
        qiHuo=new QiHuo();
    }
    public void GuPiaoAndQiHuo(){
        guPiao.chao();;
        qiHuo.chao();
    }
    public void GuoZhaiAndQiHuo(){
        guoZhai.mai();
        qiHuo.chao();
    }
    public void GuPiaoAndGuoZhai(){
        guoZhai.mai();
        qiHuo.chao();
    }
    public void GuPiaoAndGuoZhaiAndQiHuo(){
        guoZhai.mai();
        guPiao.chao();
        qiHuo.chao();
    }
}
